<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, user-scalable=no">
        <title><?= ucfirst($this->title).' - '; ?>OpCache <?= htmlspecialchars(opcache_get_configuration()['version']['version']); ?></title>
        <link rel="stylesheet" href="<?= $this->url->get('maincss'); ?>">
    </head>
    <body>
        <div id="wrap">
            <header>
                <nav class="clear">
                    <ul>
                        <li title="OpCache <?= htmlspecialchars(opcache_get_configuration()['version']['version']); ?>" id="logo">
                            <a href="<?= $this->url->get(''); ?>">Op<span>Cache</span><sup><?= htmlspecialchars(opcache_get_configuration()['version']['version']); ?></sup></a>
                        </li>
                        <li><?= $this->title; ?></li>
                        <li>
                            <a href="https://github.com/PeeHaa/OpCacheGUI" target="_blank" title="<?= $this->translator->translate('project.link'); ?>">
                                <span class="fa fa-github"></span>
                            </a>
                        </li>
                    </ul>
                </nav>
            </header>
            <?php if (!isset($this->login)) { ?>
                <section id="main-wrap" class="clear">
                    <aside>
                        <nav class="clear">
                            <ul>
                                <li<?= $this->active === 'status' ? ' class="lna"' : null ?>>
                                    <a href="<?= $this->url->get('status'); ?>"><span class="fa fa-dashboard"></span><?= $this->translator->translate('menu.status'); ?></a>
                                </li>
                                <li<?= $this->active === 'config' ? ' class="lna"' : null ?>>
                                    <a href="<?= $this->url->get('configuration'); ?>"><span class="fa fa-wrench"></span><?= $this->translator->translate('menu.config'); ?></a>
                                </li>
                                <li<?= $this->active === 'cached' ? ' class="lna"' : null ?>>
                                    <a href="<?= $this->url->get('cached-scripts'); ?>"><span class="fa fa-file-text-o"></span><?= $this->translator->translate('menu.scripts'); ?></a>
                                </li>
                                <li<?= $this->active === 'graphs' ? ' class="lna"' : null ?>>
                                    <a href="<?= $this->url->get('graphs'); ?>"><span class="fa fa-pie-chart"></span><?= $this->translator->translate('menu.graphs'); ?></a>
                                </li>
                            </ul>
                        </nav>
                    </aside>
                    <div id="left-responsive-nav">
                        <select onchange="location = this.options[this.selectedIndex].value;">
                            <option value="<?= $this->url->get('status'); ?>"<?php if ($this->active === 'status') echo ' selected="selected"' ?>>
                                <?= $this->translator->translate('menu.status'); ?>
                            </option>
                            <option value="<?= $this->url->get('configuration'); ?>"<?php if ($this->active === 'config') echo ' selected="selected"' ?>>
                                <?= $this->translator->translate('menu.config'); ?>
                            </option>
                            <option value="<?= $this->url->get('cached-scripts'); ?>"<?php if ($this->active === 'cached') echo ' selected="selected"' ?>>
                                <?= $this->translator->translate('menu.scripts'); ?>
                            </option>
                            <option value="<?= $this->url->get('graphs'); ?>"<?php if ($this->active === 'graphs') echo ' selected="selected"' ?>>
                                <?= $this->translator->translate('menu.graphs'); ?>
                            </option>
                        </select>
                    </div>
                <?php } ?>
                <section id="content">
                    <?= $this->content; ?>
                </section>
            </section>
        </div>
        <script src="<?= $this->url->get('mainjs'); ?>"></script>
    </body>
</html>
